home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Media / HyperText Stacks Folder / Xref-Text / background_2704.txt < prev    next >
Encoding:
Text File  |  1988-05-03  |  8.3 KB  |  370 lines

  1. -- background: 2704 from stack: in
  2. -- bmap block id: 6492
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on opencard
  8.   set lockText of field body to true
  9.   set the name of bkgnd button id  3 to "Edit Text"
  10. end opencard
  11.  
  12.  
  13. on closecard
  14.   set lockText of field body to true
  15.   set the name of bkgnd button id  3 to "Edit Text"
  16. end closecard
  17.  
  18.  
  19. -- part 1 (field)
  20. -- low flags: 81
  21. -- high flags: 2007
  22. -- rect: left=3 top=54 right=307 bottom=361
  23. -- title width / last selected line: 0
  24. -- icon id / first selected line: 0 / 0
  25. -- text alignment: 0
  26. -- font id: 3
  27. -- text size: 9
  28. -- style flags: 0
  29. -- line height: 12
  30. -- part name: body
  31. ----- HyperTalk script -----
  32. on mouseUp
  33.   put the shiftkey into keystate
  34.   if the selection is empty then
  35.     set lockText of the target to false -- unlock to enable text editing
  36.     repeat two times
  37.       click at the clickLoc -- double click where the user clicked
  38.     end repeat
  39.     put the selection into holder
  40.     if keystate is down then
  41.       type holder & "*"
  42.       push card
  43.       doMenu New Card
  44.       put holder into field keywords
  45.       pop card
  46.     else
  47.       push card
  48.       if holder is not empty then
  49.         visual effect zoom open
  50.         find holder in field keywords -- This line is the link
  51.         if the result is not empty then
  52.           answer "No match for keyword " "e& holder"e
  53.           pop card
  54.         end if
  55.       else
  56.         set the name of bkgnd button id 3 to "Lock Text"
  57.         click at the clickLoc
  58.         exit mouseup
  59.       end if
  60.       set lockscreen to true
  61.       put "find " & quote & holder & quote into msg
  62.       hide msg
  63.       set lockscreen to false
  64.     end if
  65.   end if
  66.   click at 0,0 --disable selection
  67.   set lockText of the target to true
  68.   hide msg
  69. end mouseUp
  70.  
  71.  
  72.  
  73. -- part 2 (field)
  74. -- low flags: 01
  75. -- high flags: 2002
  76. -- rect: left=222 top=27 right=50 bottom=402
  77. -- title width / last selected line: 0
  78. -- icon id / first selected line: 0 / 0
  79. -- text alignment: 1
  80. -- font id: 3
  81. -- text size: 12
  82. -- style flags: 256
  83. -- line height: 16
  84. -- part name: keywords
  85.  
  86.  
  87. -- part 3 (button)
  88. -- low flags: 00
  89. -- high flags: A004
  90. -- rect: left=374 top=85 right=112 bottom=510
  91. -- title width / last selected line: 0
  92. -- icon id / first selected line: 0 / 0
  93. -- text alignment: 1
  94. -- font id: 0
  95. -- text size: 12
  96. -- style flags: 0
  97. -- line height: 16
  98. -- part name: Edit Text
  99. ----- HyperTalk script -----
  100. on mouseUp
  101.   set the lockText of field body to not the lockText of field body
  102.   if lockText of field body is true then
  103.     set the name of bkgnd button id 3 to "Edit text"
  104.   else
  105.     set the name of bkgnd button id 3 to "Lock text"
  106.   end if
  107. end mouseUp
  108.  
  109.  
  110.  
  111. -- part 4 (button)
  112. -- low flags: 80
  113. -- high flags: 8003
  114. -- rect: left=415 top=124 right=152 bottom=506
  115. -- title width / last selected line: 0
  116. -- icon id / first selected line: 0 / 0
  117. -- text alignment: 1
  118. -- font id: 0
  119. -- text size: 12
  120. -- style flags: 0
  121. -- line height: 16
  122. -- part name: Lock Text
  123. ----- HyperTalk script -----
  124. on mouseUp
  125.   set lockText of field body to true
  126.   hide bkgnd button "Lock Text"
  127.   show bkgnd button "Edit Text"
  128. end mouseUp
  129.  
  130.  
  131.  
  132. -- part 6 (button)
  133. -- low flags: 00
  134. -- high flags: 0000
  135. -- rect: left=446 top=239 right=271 bottom=478
  136. -- title width / last selected line: 0
  137. -- icon id / first selected line: 21060 / 21060
  138. -- text alignment: 1
  139. -- font id: 0
  140. -- text size: 12
  141. -- style flags: 0
  142. -- line height: 16
  143. -- part name: Help
  144. ----- HyperTalk script -----
  145. on mouseUp
  146.   hide field body
  147.   show bkgnd button OK
  148. end mouseUp
  149.  
  150.  
  151.  
  152. -- part 7 (button)
  153. -- low flags: 00
  154. -- high flags: 8003
  155. -- rect: left=413 top=151 right=178 bottom=504
  156. -- title width / last selected line: 0
  157. -- icon id / first selected line: 0 / 0
  158. -- text alignment: 1
  159. -- font id: 0
  160. -- text size: 12
  161. -- style flags: 0
  162. -- line height: 16
  163. -- part name: Return
  164. ----- HyperTalk script -----
  165. on mouseUp
  166.   visual effect zoom open
  167.   pop card
  168. end mouseUp
  169.  
  170.  
  171.  
  172. -- part 8 (button)
  173. -- low flags: 00
  174. -- high flags: 8003
  175. -- rect: left=415 top=179 right=207 bottom=506
  176. -- title width / last selected line: 0
  177. -- icon id / first selected line: 0 / 0
  178. -- text alignment: 1
  179. -- font id: 0
  180. -- text size: 12
  181. -- style flags: 0
  182. -- line height: 16
  183. -- part name: New Stack
  184. ----- HyperTalk script -----
  185. on mouseUp
  186.   doMenu New Stack...
  187. end mouseUp
  188.  
  189.  
  190.  
  191. -- part 9 (button)
  192. -- low flags: 00
  193. -- high flags: 0000
  194. -- rect: left=446 top=297 right=330 bottom=478
  195. -- title width / last selected line: 0
  196. -- icon id / first selected line: 11045 / 11045
  197. -- text alignment: 1
  198. -- font id: 0
  199. -- text size: 12
  200. -- style flags: 0
  201. -- line height: 16
  202. -- part name: Home
  203. ----- HyperTalk script -----
  204. on mouseUp
  205.   visual effect iris close to black
  206.   visual effect iris open to white
  207.   visual effect dissolve
  208.   go home
  209. end mouseUp
  210.  
  211.  
  212.  
  213. -- part 10 (button)
  214. -- low flags: 00
  215. -- high flags: 0000
  216. -- rect: left=477 top=270 right=298 bottom=509
  217. -- title width / last selected line: 0
  218. -- icon id / first selected line: 8419 / 8419
  219. -- text alignment: 1
  220. -- font id: 0
  221. -- text size: 12
  222. -- style flags: 0
  223. -- line height: 16
  224. -- part name: Next
  225. ----- HyperTalk script -----
  226. on mouseUp
  227.   visual effect wipe right
  228.   go next
  229. end mouseUp
  230.  
  231.  
  232.  
  233. -- part 11 (button)
  234. -- low flags: 00
  235. -- high flags: 0000
  236. -- rect: left=415 top=270 right=298 bottom=447
  237. -- title width / last selected line: 0
  238. -- icon id / first selected line: 17779 / 17779
  239. -- text alignment: 1
  240. -- font id: 0
  241. -- text size: 12
  242. -- style flags: 0
  243. -- line height: 16
  244. -- part name: Prev
  245. ----- HyperTalk script -----
  246. on mouseUp
  247.   visual effect wipe left
  248.   go prev
  249. end mouseUp
  250.  
  251.  
  252.  
  253. -- part 12 (button)
  254. -- low flags: 00
  255. -- high flags: 8003
  256. -- rect: left=365 top=107 right=129 bottom=401
  257. -- title width / last selected line: 0
  258. -- icon id / first selected line: 0 / 0
  259. -- text alignment: 1
  260. -- font id: 0
  261. -- text size: 12
  262. -- style flags: 0
  263. -- line height: 16
  264. -- part name: OK
  265. ----- HyperTalk script -----
  266. on mouseUp
  267.   hide bkgnd button OK
  268.   show field body
  269. end mouseUp
  270.  
  271.  
  272.  
  273. -- part 15 (button)
  274. -- low flags: 00
  275. -- high flags: 8004
  276. -- rect: left=376 top=209 right=236 bottom=510
  277. -- title width / last selected line: 0
  278. -- icon id / first selected line: 0 / 0
  279. -- text alignment: 1
  280. -- font id: 0
  281. -- text size: 12
  282. -- style flags: 0
  283. -- line height: 16
  284. -- part name: Scan text for Ref
  285. ----- HyperTalk script -----
  286. on mouseUp
  287.   put the name of this card into maincard
  288.   set lockscreen to true
  289.   repeat with i= 1 to the number of words in field body
  290.     put word i of field body into holder
  291.     if last char of holder="." then
  292.       put empty into last char of holder
  293.     end if
  294.     if last char of holder="," then
  295.       put empty into last char of holder
  296.     end if
  297.     if last char of holder="!" then
  298.       put empty into last char of holder
  299.     end if
  300.     if last char of holder="?" then
  301.       put empty into last char of holder
  302.     end if
  303.     if last char of holder ="*" then
  304.       put empty into last char of holder --kill the asterisk
  305.     end if
  306.  
  307.     find holder in field keywords -- This line is the link
  308.     if the result is not "not found" then
  309.       put field keywords into temp
  310.       if temp<>holder then
  311.         go to maincard
  312.         next repeat
  313.       end if
  314.       go to maincard
  315.       put holder & "*" into word I of field body
  316.     end if
  317.     set lockscreen to false
  318.   end repeat
  319.  
  320. end mouseUp
  321.  
  322.  
  323.  
  324. -- part 17 (button)
  325. -- low flags: 00
  326. -- high flags: 8004
  327. -- rect: left=373 top=120 right=147 bottom=510
  328. -- title width / last selected line: 0
  329. -- icon id / first selected line: 0 / 0
  330. -- text alignment: 1
  331. -- font id: 0
  332. -- text size: 12
  333. -- style flags: 0
  334. -- line height: 16
  335. -- part name: Auto Create Ref
  336. ----- HyperTalk script -----
  337. on mouseUp
  338.   put the name of this card into maincard
  339.   set the cursor to 4
  340.   repeat with i= 1 to the number of words in field body
  341.     put word i of field body into holder
  342.     if last char of holder="." then
  343.       put empty into last char of holder
  344.     end if
  345.     if last char of holder="," then
  346.       put empty into last char of holder
  347.     end if
  348.     if last char of holder="!" then
  349.       put empty into last char of holder
  350.     end if
  351.     if last char of holder="?" then
  352.       put empty into last char of holder
  353.     end if
  354.     if last char of holder ="*" then
  355.       put empty into last char of holder --kill the asterisk
  356.       find holder in field keywords -- This line is the link
  357.       if the result is "not found" then
  358.         domenu new card
  359.         put holder into field keywords
  360.         go to card maincard
  361.       else
  362.         go to maincard
  363.       end if
  364.       go to maincard
  365.     end if
  366.   end repeat
  367.   beep
  368. end mouseUp
  369.  
  370.